<?php

class Application_Form_MultimediaSet extends Zend_Form
{
    public function init()
    {
        $this->setName('MultimediaSet');

        $set_id = new Zend_Form_Element_Hidden('set_id');
        $set_id->addFilter('Int');

        $slug = new Zend_Form_Element_Text('slug');
        $slug->setLabel('slug')
              ->setRequired(true)
              ->addFilter('StripTags')
              ->addFilter('StringTrim')
              ->addValidator('NotEmpty');
              
        $title = new Zend_Form_Element_Text('title');
        $title->setLabel('title')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
		$description = new Zend_Form_Element_Text('description');
        $description->setLabel('description')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
        $created_date = new Zend_Form_Element_Text('created_date');
        $created_date->setLabel('created date')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty')
			   ->addValidator('Date');
			   
		$updated_date = new Zend_Form_Element_Text('updated_date');
        $updated_date->setLabel('updated date')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty')
			   ->addValidator('Date');
			   
        $created_user_id = new Zend_Form_Element_Text('created_user_id');
        $created_user_id->setLabel('created user id')
        					  ->addFilter('Int');
        $created_user_name = new Zend_Form_Element_Text('created_user_name');
        $created_user_name->setLabel('created user name')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
		$num_views = new Zend_Form_Element_Text('num_views');
        $num_views->setLabel('num views')
        					  ->addFilter('Int');
		$num_comments = new Zend_Form_Element_Text('num_comments');
        $num_comments->setLabel('num comments')
        					  ->addFilter('Int');
		$is_active = new Zend_Form_Element_Text('is_active');
        $is_active->setLabel('is active')
        					  ->addFilter('Int');
		$image_thumbnail = new Zend_Form_Element_Text('image_thumbnail');
        $image_thumbnail->setLabel('image thumbnail')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');					  
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'submitbutton');

        $this->addElements(array($set_id, $slug, $title, $description, $created_date, $updated_date, $created_user_id, $created_user_name, $num_views, $num_comments, $is_active, $image_thumbnail, $submit));
    }
}